package com.travel.service.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.travel.base.BaseDao;
import com.travel.base.impl.BaseServiceImpl;
import com.travel.bean.Stra1Picture;
import com.travel.dao.Stra1PictureDao;
import com.travel.service.Stra1PictureService;

@Service("stra1PictureServiceImpl")
public class Stra1PictureServiceImpl extends BaseServiceImpl<Stra1Picture> implements Stra1PictureService {
	@Resource(name="stra1PictureDaoImpl")
	private Stra1PictureDao stra1PictureDao;
	@Override
	public BaseDao<Stra1Picture> getBaseDao() {
		// TODO Auto-generated method stub
		return stra1PictureDao;
	}
/**
 * 一次储存多个旅游攻略的段落1的图片
 * @param list
 * @return
 */
	public boolean addStra1Picture(List<Stra1Picture> list){
		 boolean flag=true;
		 try {
			for (Stra1Picture stra1Picture : list) {
				 stra1PictureDao.saveEntry(stra1Picture);
				 System.out.println("数据库添加！");
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			flag=false;
			e.printStackTrace();
		}
		 
		return flag;
	}
	
}
